home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Visual Basic new SourceCode and Projects / Barcode Generator 2.0 / KewlThings.bas < prev    next >
Encoding:
BASIC Source File  |  2000-06-22  |  792 b   |  22 lines

  1. Attribute VB_Name = "KewlThings"
  2. Sub ShortCut()
  3. Dim WSHShell
  4. Set WSHShell = CreateObject("WScript.Shell")
  5.  
  6. Dim MyShortcut, MyDesktop, DesktopPath
  7.  
  8. ' Read desktop path using WshSpecialFolders object
  9. DesktopPath = WSHShell.specialfolders("Desktop")
  10.  
  11. ' Create a shortcut object on the desktop
  12. Set MyShortcut = WSHShell.CreateShortcut(DesktopPath & "\Bar Code Generator.lnk")
  13.  
  14. ' Set shortcut object properties and save it
  15. MyShortcut.TargetPath = WSHShell.ExpandEnvironmentStrings(App.Path & "\" & App.EXEName)
  16. MyShortcut.WorkingDirectory = WSHShell.ExpandEnvironmentStrings(App.Path)
  17. MyShortcut.WindowStyle = 4
  18. MyShortcut.IconLocation = WSHShell.ExpandEnvironmentStrings((App.Path & "\" & App.EXEName & ".exe") & ", 0")
  19. MyShortcut.Save
  20. MsgBox "Finish", vbSystemModal
  21. End Sub
  22.